package com.menghai;

import java.util.Calendar;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import sun.misc.Regexp;

public class WAN {

	public static void main(String[] args) {
		//WAN wan = new WAN();
		
		
//		Calendar cal = Calendar.getInstance();  
//        cal.set(1999, 12, 31); // Year, Month, Day  
//        System.out.print(cal.get(Calendar.YEAR) + " ");  
//        Date d = cal.getTime();  
//        System.out.println(d.getDay());  
		
		String s = "ETKT-0000-0000-0000-0000-0000";
		System.out.println(s.substring(21).replaceAll("-", ""));

		String str = "aa&bbc.eff{ewo{";
		
		Pattern p = Pattern.compile("[^\\w]");
		Matcher m = p.matcher(str);
		while(m.find()){
			String strMat = m.group();
			if(str.lastIndexOf("\\"+strMat)<=0){
				str = str.replace(strMat, "\\"+strMat);
			}
		}
		System.out.println(str);
		System.out.println(str.replaceAll("[^\\w]", "(1)"));
		
		
		
	}

	public void wan(){
		
	}
}
